<?php


/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Education
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 */
 
 
?>

<div class='layout_right education_view_layout_right'>
  <div class='educations_gutter'>
  
    <div class="education_gutter_photo">
      <?php echo $this->itemPhoto($this->education, 'thumb.profile'); ?>
    </div>
  
    <div class='educations_gutter_owner'>
      <div class="educations_gutter_owner_photo">
        <?php echo $this->htmlLink($this->owner->getHref(),
          $this->itemPhoto($this->owner, 'thumb.icon')
        )?>
      </div>
      <div class="educations_gutter_owner_title">
        <?php echo $this->htmlLink($this->owner->getHref(), $this->owner->getTitle()) ?>
        <span><?php echo $this->translate(array('%s education entry','%s education entries', $this->totalEducations), $this->totalEducations); ?></span>
      </div>
      <div style="clear: both;"></div>
    </div>  
  
    <div class="educations_gutter_options">
    <?php
      // Render the menu
      echo $this->navigation()
        ->menu()
        ->setContainer($this->gutterNavigation)
        ->setUlClass('navigation')
        ->render();
    ?>
    </div>

    <div class="education_gutter_info">
      <h4><?php echo $this->translate('Submitter & Stats'); ?></h4>
      <div class="education_gutter_info_details">
        <ul>
          <li><?php echo $this->translate('By %s', $this->owner->__toString())?></li>
          <li><?php echo $this->translate('Posted on %s', $this->locale()->toDate($this->education->creation_date)); ?>
          <li><?php echo $this->translate('Updated %s', $this->timestamp($this->education->modified_date)); ?>
          <li><?php echo $this->translate(array('%s total view', '%s total views', $this->education->view_count), $this->education->view_count); ?></li>
          <?php if (count($tagMaps = $this->education->tags()->getTagMaps()) > 0): ?>
            <?php $tagLinks = array(); ?>
            <?php foreach ($tagMaps as $tagMap): $tag = $tagMap->getTag()?>
              <?php if (!empty($tag->text)):?>
                <?php $tagLinks[] = '#'.$this->htmlLink(array('route'=>'education_general', 'action'=>'browse', 'tag'=>$tag->tag_id), $tag->text); ?>
              <?php endif; ?>
            <?php endforeach; ?>
            <li><?php echo $this->translate('Tags: %s', join(" ", $tagLinks));?></li>
          <?php endif; ?>
        </ul>
      </div>
    </div>

  </div>
</div>

<div class='layout_middle education_layout_middle'>
  <div class='education_view<?php if ($this->education->featured):?> education_featured_entry<?php endif;?>'>
    <h2>
      <?php echo $this->translate('%s\'s Education', $this->owner->__toString())?>
    </h2>
  
    <h3>
      <?php echo $this->education->getTitle() ?>
    </h3>
    
    <?php if ($this->education->getDescription()): ?>
      <div class="education_body">
        <?php echo nl2br($this->education->getDescription()) ?>
      </div> 
    <?php endif; ?>
    <div class="profile_fields">

      <h4>
        <span><?php echo $this->translate('Attendance Information');?></span>
      </h4>
      <ul>
          <li>
            <span><?php echo $this->translate('School Type')?></span>
            <span><?php echo $this->translate($this->education->getCategory()->getTitle()); ?></span>
          </li>
        <?php if ($this->education->class_year): ?>
          <li>
            <span><?php echo $this->translate('Class Year')?></span>
            <span><?php echo $this->education->class_year; ?></span>
          </li>
        <?php endif;?>
        <?php if ($this->education->concentration): ?>
          <li>
            <span><?php echo $this->translate('Concentration')?></span>
            <span><?php echo $this->education->concentration; ?></span>
          </li>
        <?php endif;?>
        <?php if ($this->education->minor): ?>
          <li>
            <span><?php echo $this->translate('Minor')?></span>
            <span><?php echo $this->education->minor; ?></span>
          </li>
        <?php endif;?>
        <?php if ($this->education->degree): ?>
          <li>
            <span><?php echo $this->translate('Degree')?></span>
            <span><?php echo $this->education->degree; ?></span>
          </li>
        <?php endif;?>
      </ul>
      <?php if ($education_field_values = $this->fieldValueLoop($this->education, $this->fieldStructure)): ?>
        <h4>
          <span><?php echo $this->translate('Other Details');?></span>
        </h4>
    	  <?php echo $education_field_values; ?>
      <?php endif; ?>
    </div>
    
    


    <div class="education_tool_links">
      <?php echo $this->htmlLink(Array('module'=> 'activity', 'controller' => 'index', 'action' => 'share', 'route' => 'default', 'type' => 'education', 'id' => $this->education->getIdentity(), 'format' => 'smoothbox'), $this->translate("Share"), array('class' => 'smoothbox')); ?>
      - <?php echo $this->htmlLink(Array('module'=> 'core', 'controller' => 'report', 'action' => 'create', 'route' => 'default', 'subject' =>  $this->education->getGuid(), 'format' => 'smoothbox'), $this->translate("Report"), array('class' => 'smoothbox')); ?>
    </div>
       	  
    <a name="comments"></a>
    <?php echo $this->action("list", "comment", "core", array("type"=>"education", "id"=>$this->education->getIdentity())) ?>
  </div>
</div>